位置を指定して文字列を置き換え
Top > Ruby [2.2.2] > []=
test = "acha" test2=test.dup;test2[4]="porute" p test2 # achaporute test2=test.dup;test2[0..-1]="piipo" p test2 # piipo test2=test.dup;test2[/\A(.{4})/]="acha" p test2 # acha test2=test.dup;test2[/\A.{1}(.{1})/,1]="porute" p test2 # aoruteha